package Hot100;

public class 跳跃游戏 {
    public boolean canJump(int[] nums) {
        int len = nums.length;
        int end = 1;
        for (int i = 0; i < end; i++) {
            end = Math.max(end, i + nums[i] + 1);
            if (end >= len) return true;
        }
        return false;
    }
}
